//SkyDome.h
//Created 10/07/13
//Created By Daniel Bowler
//
//Draws a skydome for us.

#pragma once

#include "d3dUtil.h"

class ShaderManager;
class SkyDomeFX;
class VirtualCamera;

class SkyDome
{
public:
	SkyDome(ID3D11Device* device, LPCWSTR cubeMapFilePath, VirtualCamera* cam);
	~SkyDome();

	void Render(ID3D11DeviceContext* context, VirtualCamera* cam);

	//Returns the cube map
	ID3D11ShaderResourceView* ReturnCubeMapSRV(){return srv;};
private:
	//Pointer to a SRV that represents our CubeMap
	ID3D11ShaderResourceView* srv;

	//ShaderManager pointer and our skyDome effect
	ShaderManager* sharedShaderManager;
	SkyDomeFX* effect;

	//Camera pointer.
	VirtualCamera* camera;

	//Buffers for dome
	ID3D11Buffer* sphereVertex;
	ID3D11Buffer* sphereIndex;

	unsigned sphereIndexCount;

	//Cretaes sphere
	void CreateBuffers(ID3D11Device* device, float sphereRadius);
};